


	clear
	use Data_20170719.dta
	xtset ccode year

		eststo clear

		* Main Models
		* Prostitution (Destination)
		* All States
		eststo: probit pdest ln_totalpeacekeepers ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest ln_totalpeacekeepers intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest ln_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  , robust
		* PKO > 0 
		eststo: probit pdest ln_totalpeacekeepers ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pdest ln_totalpeacekeepers intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pdest ln_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust

		#delimit ;
		esttab _all using Models_pdest.tex, replace  
			b(3) 
			se(3) 
			scalars("N N" "ll log-likelihood" "chi2 $ \chi^2$")
			sfmt(%9.3f)
			star(* 0.10 ** 0.02)
			label 
			order(ln_totalpeacekeepers  ln_domestic9 ln_w_domestic9 intensity_low w_intensity_low intensity_high w_intensity_high w_psource w_pdest polity2 ln_pop ln_gdpwb borderstates) 
			nogaps 
			wide
			mgroups("All States (1--3)" "PKO $>$ 0 (4--6)", pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cline{@span}))
			compress 
			nomtitles 
			nonotes
			addnotes("Robust standard errors in parentheses. One-tailed significance tests used: \textit{$ * p<0.05 $, ** $ p<0.01 $}")
			;

			#delimit cr



		* Main Models - Conditional models
		* Prostitution (Destination) Conditional Mdoels
		* All States
		eststo clear
		eststo: probit pdest c.ln_totalpeacekeepers##c.contribcount ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest c.ln_totalpeacekeepers##c.contribcount intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest c.ln_totalpeacekeepers##c.contribcount intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  , robust 
		* Duration Models
		eststo: probit pdest c.ln_totalpeacekeepers##c.duration_pk_totalpeacekeepers ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest c.ln_totalpeacekeepers##c.duration_pk_totalpeacekeepers intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest c.ln_totalpeacekeepers##c.duration_pk_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  , robust 

		* Paper models with PKO > 0
		eststo: probit pdest c.ln_totalpeacekeepers##c.contribcount intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  if totalpeace>0 , robust 
		eststo: probit pdest c.ln_totalpeacekeepers##c.duration_pk_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border if totalpeace>0 , robust 

		#delimit ;
		esttab est3 est6 est7 est8 using Models_pdest_conditional.tex, replace  
			b(3) 
			se(3) 
			scalars("N N" "ll log-likelihood" "chi2 $ \chi^2$")
			sfmt(%9.3f)
			star(* 0.10 ** 0.02)
			label 
			order(ln_totalpeacekeepers contribcount c.ln_totalpeacekeepers#c.contribcount duration_pk_totalpeacekeepers c.ln_totalpeacekeepers#c.duration_pk_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest polity2 ln_pop ln_gdpwb borderstates) 
			nogaps 
			wide
			compress 
			nomtitles 
			nonotes
			mgroups("All States (1--2)" "PKO $>$ 0 (3--4)", pattern(1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cline{@span}))
			addnotes("Robust standard errors in parentheses. One-tailed significance tests used: \textit{$ * p<0.05 $, ** $ p<0.01 $}")
			;

			#delimit cr	

		
		* Main Models - Restricted Sample Models
		* Prostitution (Destination)
		* All States
		xtset ccode year
		by ccode: egen candidate = max(intensitylevel)
		eststo clear

		eststo: probit pdest ln_totalpeacekeepers intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border if candidate==1 , robust 
		eststo: probit pdest ln_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  if candidate==2, robust 
		eststo: probit pdest ln_totalpeacekeepers intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pdest ln_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest     polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 

		#delimit ;
		esttab _all using Models_pdest_limitedsample.tex, replace  
			b(3) 
			se(3) 
			scalars("N N" "ll log-likelihood" "chi2 $ \chi^2$")
			sfmt(%9.3f)
			star(* 0.10 ** 0.02)
			label 
			order(ln_totalpeacekeepers intensity_low w_intensity_low intensity_high w_intensity_high w_psource w_pdest polity2 ln_pop ln_gdpwb borderstates) 
			nogaps 
			wide
			compress 
			nomtitles 
			mgroups("Low Intensity" "High Intensity" "PKO $>$ 0" "PKO $>$ 0", pattern(1 1 1 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cline{@span}))
			nonotes
			addnotes("Robust standard errors in parentheses. One-tailed significance tests used: \textit{$ * p<0.05 $, ** $ p<0.01 $}")
			;

			#delimit cr
			
		

		* Appendix Models
		* Prostitution (Destination). Omitting peacekeeping variables to examine effect of conflict alone. 
		* All States
		eststo clear
		eststo: probit pdest ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  , robust 

		#delimit ;
		esttab _all using Models_pdest_conflictonly.tex, replace  
			b(3) 
			se(3) 
			scalars("N N" "ll log-likelihood" "chi2 $ \chi^2$")
			sfmt(%9.3f)
			star(* 0.10 ** 0.02)
			label 
			order(ln_domestic9 ln_w_domestic9 intensity_low w_intensity_low intensity_high w_intensity_high w_psource w_pdest polity2 ln_pop ln_gdpwb borderstates) 
			nogaps 
			wide
			compress 
			nomtitles 
			nonotes
			addnotes("Robust standard errors in parentheses. One-tailed significance tests used: \textit{$ * p<0.05 $, ** $ p<0.01 $}")
			;

			#delimit cr	
		
		
	* Disaggregate model with only military	
		xtset ccode year
		eststo clear
	* Prostitution (Destination), only military
		* All States
		eststo: probit pdest ln_trooppeacekeeper ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest ln_trooppeacekeeper intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest ln_trooppeacekeeper intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  , robust
		* PKO > 0 
		eststo: probit pdest ln_trooppeacekeeper ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pdest ln_trooppeacekeeper intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pdest ln_trooppeacekeeper intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust

		#delimit ;
		esttab _all using MilitaryOnlyModels_pdest.tex, replace  
			b(3) 
			se(3) 
			scalars("N N" "ll log-likelihood" "chi2 $ \chi^2$")
			sfmt(%9.3f)
			star(* 0.10 ** 0.02)
			label 
			order(ln_trooppeacekeeper  ln_domestic9 ln_w_domestic9 intensity_low w_intensity_low intensity_high w_intensity_high w_psource w_pdest polity2 ln_pop ln_gdpwb borderstates) 
			nogaps 
			wide
			mgroups("All States (1--3)" "PKO $>$ 0 (4--6)", pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cline{@span}))
			compress 
			nomtitles 
			nonotes
			addnotes("Robust standard errors in parentheses. One-tailed significance tests used: \textit{$ * p<0.05 $, ** $ p<0.01 $}")
			;

			#delimit cr


	
		* Disaggregated model with only police
		xtset ccode year
		eststo clear
		* Prostitution (Destination), only police
		* All States
		eststo: probit pdest ln_police ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest ln_police intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pdest ln_police intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  , robust
		* PKO > 0 
		eststo: probit pdest ln_police ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pdest ln_police intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pdest ln_police intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust

		#delimit ;
		esttab _all using PoliceOnlyModels_pdest.tex, replace  
			b(3) 
			se(3) 
			scalars("N N" "ll log-likelihood" "chi2 $ \chi^2$")
			sfmt(%9.3f)
			star(* 0.10 ** 0.02)
			label 
			order(ln_police  ln_domestic9 ln_w_domestic9 intensity_low w_intensity_low intensity_high w_intensity_high w_psource w_pdest polity2 ln_pop ln_gdpwb borderstates) 
			nogaps 
			wide
			mgroups("All States (1--3)" "PKO $>$ 0 (4--6)", pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cline{@span}))
			compress 
			nomtitles 
			nonotes
			addnotes("Robust standard errors in parentheses. One-tailed significance tests used: \textit{$ * p<0.05 $, ** $ p<0.01 $}")
			;

			#delimit cr



	
		clear
		use Data_20170719.dta
		xtset ccode year
		eststo clear

		* Main Models
		* Prostitution (Destination)
		* All States
		eststo: probit pinternal ln_totalpeacekeepers ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pinternal ln_totalpeacekeepers intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border  , robust 
		eststo: probit pinternal ln_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border  , robust
		* PKO > 0 
		eststo: probit pinternal ln_totalpeacekeepers ln_domestic9 ln_w_domestic9 w_psource w_pdest       polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pinternal ln_totalpeacekeepers intensity_low w_intensity_low w_psource w_pdest     polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust 
		eststo: probit pinternal ln_totalpeacekeepers intensity_high w_intensity_high w_psource w_pdest   polity2 ln_pop ln_gdpwb  border if totalpeacekeepers>0 , robust

		#delimit ;
		esttab _all using Models_pinternal.tex, replace  
			b(3) 
			se(3) 
			scalars("N N" "ll log-likelihood" "chi2 $ \chi^2$")
			sfmt(%9.3f)
			star(* 0.10 ** 0.02)
			label 
			order(ln_totalpeacekeepers  ln_domestic9 ln_w_domestic9 intensity_low w_intensity_low intensity_high w_intensity_high w_psource w_pdest polity2 ln_pop ln_gdpwb borderstates) 
			nogaps 
			wide
			mgroups("All States (1--3)" "PKO $>$ 0 (4--6)", pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cline{@span}))
			compress 
			nomtitles 
			nonotes
			addnotes("Robust standard errors in parentheses. One-tailed significance tests used: \textit{$ * p<0.05 $, ** $ p<0.01 $}")
			;

			#delimit cr
			
			eststo clear	
			
